3.3.77 \(\int \frac {(c+d x^2)^2}{x^2 (a+b x^2)^2} \, dx\)

Optimal. Leaf size=103 \[ -\frac {(b c-a d) (a d+3 b c) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 a^{5/2} b^{3/2}}-\frac {x \left (\frac {3 b c^2}{a}+\frac {a d^2}{b}-2 c d\right )}{2 a \left (a+b x^2\right )}-\frac {c^2}{a x \left (a+b x^2\right )} \]

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 103, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {462, 385, 205} \begin {gather*} -\frac {(b c-a d) (a d+3 b c) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 a^{5/2} b^{3/2}}-\frac {x \left (\frac {3 b c^2}{a}+\frac {a d^2}{b}-2 c d\right )}{2 a \left (a+b x^2\right )}-\frac {c^2}{a x \left (a+b x^2\right )} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(c + d*x^2)^2/(x^2*(a + b*x^2)^2),x]

[Out]

-(c^2/(a*x*(a + b*x^2))) - (((3*b*c^2)/a - 2*c*d + (a*d^2)/b)*x)/(2*a*(a + b*x^2)) - ((b*c - a*d)*(3*b*c + a*d
)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/(2*a^(5/2)*b^(3/2))

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 385

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> -Simp[((b*c - a*d)*x*(a + b*x^n)^(p +
 1))/(a*b*n*(p + 1)), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(a*b*n*(p + 1)), Int[(a + b*x^n)^(p + 1), x], x] /
; FreeQ[{a, b, c, d, n, p}, x] && NeQ[b*c - a*d, 0] && (LtQ[p, -1] || ILtQ[1/n + p, 0])

Rule 462

Int[((e_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^2, x_Symbol] :> Simp[(c^2*(e*x)^(
m + 1)*(a + b*x^n)^(p + 1))/(a*e*(m + 1)), x] - Dist[1/(a*e^n*(m + 1)), Int[(e*x)^(m + n)*(a + b*x^n)^p*Simp[b
*c^2*n*(p + 1) + c*(b*c - 2*a*d)*(m + 1) - a*(m + 1)*d^2*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, p}, x] && Ne
Q[b*c - a*d, 0] && IGtQ[n, 0] && LtQ[m, -1] && GtQ[n, 0]

Rubi steps

\begin {align*} \int \frac {\left (c+d x^2\right )^2}{x^2 \left (a+b x^2\right )^2} \, dx &=-\frac {c^2}{a x \left (a+b x^2\right )}+\frac {\int \frac {-c (3 b c-2 a d)+a d^2 x^2}{\left (a+b x^2\right )^2} \, dx}{a}\\ &=-\frac {c^2}{a x \left (a+b x^2\right )}-\frac {\left (\frac {d^2}{b}+\frac {c (3 b c-2 a d)}{a^2}\right ) x}{2 \left (a+b x^2\right )}-\frac {((b c-a d) (3 b c+a d)) \int \frac {1}{a+b x^2} \, dx}{2 a^2 b}\\ &=-\frac {c^2}{a x \left (a+b x^2\right )}-\frac {\left (\frac {d^2}{b}+\frac {c (3 b c-2 a d)}{a^2}\right ) x}{2 \left (a+b x^2\right )}-\frac {(b c-a d) (3 b c+a d) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 a^{5/2} b^{3/2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.07, size = 91, normalized size = 0.88 \begin {gather*} -\frac {x (a d-b c)^2}{2 a^2 b \left (a+b x^2\right )}-\frac {c^2}{a^2 x}+\frac {\left (a^2 d^2+2 a b c d-3 b^2 c^2\right ) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 a^{5/2} b^{3/2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x^2)^2/(x^2*(a + b*x^2)^2),x]

[Out]

-(c^2/(a^2*x)) - ((-(b*c) + a*d)^2*x)/(2*a^2*b*(a + b*x^2)) + ((-3*b^2*c^2 + 2*a*b*c*d + a^2*d^2)*ArcTan[(Sqrt
[b]*x)/Sqrt[a]])/(2*a^(5/2)*b^(3/2))

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (c+d x^2\right )^2}{x^2 \left (a+b x^2\right )^2} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(c + d*x^2)^2/(x^2*(a + b*x^2)^2),x]

[Out]

IntegrateAlgebraic[(c + d*x^2)^2/(x^2*(a + b*x^2)^2), x]

________________________________________________________________________________________

fricas [A]  time = 0.98, size = 308, normalized size = 2.99 \begin {gather*} \left [-\frac {4 \, a^{2} b^{2} c^{2} + 2 \, {\left (3 \, a b^{3} c^{2} - 2 \, a^{2} b^{2} c d + a^{3} b d^{2}\right )} x^{2} - {\left ({\left (3 \, b^{3} c^{2} - 2 \, a b^{2} c d - a^{2} b d^{2}\right )} x^{3} + {\left (3 \, a b^{2} c^{2} - 2 \, a^{2} b c d - a^{3} d^{2}\right )} x\right )} \sqrt {-a b} \log \left (\frac {b x^{2} - 2 \, \sqrt {-a b} x - a}{b x^{2} + a}\right )}{4 \, {\left (a^{3} b^{3} x^{3} + a^{4} b^{2} x\right )}}, -\frac {2 \, a^{2} b^{2} c^{2} + {\left (3 \, a b^{3} c^{2} - 2 \, a^{2} b^{2} c d + a^{3} b d^{2}\right )} x^{2} + {\left ({\left (3 \, b^{3} c^{2} - 2 \, a b^{2} c d - a^{2} b d^{2}\right )} x^{3} + {\left (3 \, a b^{2} c^{2} - 2 \, a^{2} b c d - a^{3} d^{2}\right )} x\right )} \sqrt {a b} \arctan \left (\frac {\sqrt {a b} x}{a}\right )}{2 \, {\left (a^{3} b^{3} x^{3} + a^{4} b^{2} x\right )}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x^2+c)^2/x^2/(b*x^2+a)^2,x, algorithm="fricas")

[Out]

[-1/4*(4*a^2*b^2*c^2 + 2*(3*a*b^3*c^2 - 2*a^2*b^2*c*d + a^3*b*d^2)*x^2 - ((3*b^3*c^2 - 2*a*b^2*c*d - a^2*b*d^2
)*x^3 + (3*a*b^2*c^2 - 2*a^2*b*c*d - a^3*d^2)*x)*sqrt(-a*b)*log((b*x^2 - 2*sqrt(-a*b)*x - a)/(b*x^2 + a)))/(a^
3*b^3*x^3 + a^4*b^2*x), -1/2*(2*a^2*b^2*c^2 + (3*a*b^3*c^2 - 2*a^2*b^2*c*d + a^3*b*d^2)*x^2 + ((3*b^3*c^2 - 2*
a*b^2*c*d - a^2*b*d^2)*x^3 + (3*a*b^2*c^2 - 2*a^2*b*c*d - a^3*d^2)*x)*sqrt(a*b)*arctan(sqrt(a*b)*x/a))/(a^3*b^
3*x^3 + a^4*b^2*x)]

________________________________________________________________________________________

giac [A]  time = 0.33, size = 103, normalized size = 1.00 \begin {gather*} -\frac {{\left (3 \, b^{2} c^{2} - 2 \, a b c d - a^{2} d^{2}\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \, \sqrt {a b} a^{2} b} - \frac {3 \, b^{2} c^{2} x^{2} - 2 \, a b c d x^{2} + a^{2} d^{2} x^{2} + 2 \, a b c^{2}}{2 \, {\left (b x^{3} + a x\right )} a^{2} b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x^2+c)^2/x^2/(b*x^2+a)^2,x, algorithm="giac")

[Out]

-1/2*(3*b^2*c^2 - 2*a*b*c*d - a^2*d^2)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*a^2*b) - 1/2*(3*b^2*c^2*x^2 - 2*a*b*c*
d*x^2 + a^2*d^2*x^2 + 2*a*b*c^2)/((b*x^3 + a*x)*a^2*b)

________________________________________________________________________________________

maple [A]  time = 0.01, size = 131, normalized size = 1.27 \begin {gather*} \frac {c d x}{\left (b \,x^{2}+a \right ) a}+\frac {c d \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b}\, a}-\frac {b \,c^{2} x}{2 \left (b \,x^{2}+a \right ) a^{2}}-\frac {3 b \,c^{2} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \sqrt {a b}\, a^{2}}-\frac {d^{2} x}{2 \left (b \,x^{2}+a \right ) b}+\frac {d^{2} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \sqrt {a b}\, b}-\frac {c^{2}}{a^{2} x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x^2+c)^2/x^2/(b*x^2+a)^2,x)

[Out]

-1/2/b*x/(b*x^2+a)*d^2+1/a*x/(b*x^2+a)*c*d-1/2/a^2*b*x/(b*x^2+a)*c^2+1/2/b/(a*b)^(1/2)*arctan(1/(a*b)^(1/2)*b*
x)*d^2+1/a/(a*b)^(1/2)*arctan(1/(a*b)^(1/2)*b*x)*c*d-3/2/a^2*b/(a*b)^(1/2)*arctan(1/(a*b)^(1/2)*b*x)*c^2-c^2/a
^2/x

________________________________________________________________________________________

maxima [A]  time = 2.29, size = 101, normalized size = 0.98 \begin {gather*} -\frac {2 \, a b c^{2} + {\left (3 \, b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} x^{2}}{2 \, {\left (a^{2} b^{2} x^{3} + a^{3} b x\right )}} - \frac {{\left (3 \, b^{2} c^{2} - 2 \, a b c d - a^{2} d^{2}\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \, \sqrt {a b} a^{2} b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x^2+c)^2/x^2/(b*x^2+a)^2,x, algorithm="maxima")

[Out]

-1/2*(2*a*b*c^2 + (3*b^2*c^2 - 2*a*b*c*d + a^2*d^2)*x^2)/(a^2*b^2*x^3 + a^3*b*x) - 1/2*(3*b^2*c^2 - 2*a*b*c*d
- a^2*d^2)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*a^2*b)

________________________________________________________________________________________

mupad [B]  time = 0.14, size = 128, normalized size = 1.24 \begin {gather*} \frac {\mathrm {atan}\left (\frac {\sqrt {b}\,x\,\left (a\,d-b\,c\right )\,\left (a\,d+3\,b\,c\right )}{\sqrt {a}\,\left (a^2\,d^2+2\,a\,b\,c\,d-3\,b^2\,c^2\right )}\right )\,\left (a\,d-b\,c\right )\,\left (a\,d+3\,b\,c\right )}{2\,a^{5/2}\,b^{3/2}}-\frac {\frac {c^2}{a}+\frac {x^2\,\left (a^2\,d^2-2\,a\,b\,c\,d+3\,b^2\,c^2\right )}{2\,a^2\,b}}{b\,x^3+a\,x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c + d*x^2)^2/(x^2*(a + b*x^2)^2),x)

[Out]

(atan((b^(1/2)*x*(a*d - b*c)*(a*d + 3*b*c))/(a^(1/2)*(a^2*d^2 - 3*b^2*c^2 + 2*a*b*c*d)))*(a*d - b*c)*(a*d + 3*
b*c))/(2*a^(5/2)*b^(3/2)) - (c^2/a + (x^2*(a^2*d^2 + 3*b^2*c^2 - 2*a*b*c*d))/(2*a^2*b))/(a*x + b*x^3)

________________________________________________________________________________________

sympy [B]  time = 0.87, size = 238, normalized size = 2.31 \begin {gather*} - \frac {\sqrt {- \frac {1}{a^{5} b^{3}}} \left (a d - b c\right ) \left (a d + 3 b c\right ) \log {\left (- \frac {a^{3} b \sqrt {- \frac {1}{a^{5} b^{3}}} \left (a d - b c\right ) \left (a d + 3 b c\right )}{a^{2} d^{2} + 2 a b c d - 3 b^{2} c^{2}} + x \right )}}{4} + \frac {\sqrt {- \frac {1}{a^{5} b^{3}}} \left (a d - b c\right ) \left (a d + 3 b c\right ) \log {\left (\frac {a^{3} b \sqrt {- \frac {1}{a^{5} b^{3}}} \left (a d - b c\right ) \left (a d + 3 b c\right )}{a^{2} d^{2} + 2 a b c d - 3 b^{2} c^{2}} + x \right )}}{4} + \frac {- 2 a b c^{2} + x^{2} \left (- a^{2} d^{2} + 2 a b c d - 3 b^{2} c^{2}\right )}{2 a^{3} b x + 2 a^{2} b^{2} x^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x**2+c)**2/x**2/(b*x**2+a)**2,x)

[Out]

-sqrt(-1/(a**5*b**3))*(a*d - b*c)*(a*d + 3*b*c)*log(-a**3*b*sqrt(-1/(a**5*b**3))*(a*d - b*c)*(a*d + 3*b*c)/(a*
*2*d**2 + 2*a*b*c*d - 3*b**2*c**2) + x)/4 + sqrt(-1/(a**5*b**3))*(a*d - b*c)*(a*d + 3*b*c)*log(a**3*b*sqrt(-1/
(a**5*b**3))*(a*d - b*c)*(a*d + 3*b*c)/(a**2*d**2 + 2*a*b*c*d - 3*b**2*c**2) + x)/4 + (-2*a*b*c**2 + x**2*(-a*
*2*d**2 + 2*a*b*c*d - 3*b**2*c**2))/(2*a**3*b*x + 2*a**2*b**2*x**3)

________________________________________________________________________________________